package com.woniu.client;

import com.woniu.client.accountdto.CoachResumeDto;
import com.woniu.client.accountdto.CoachTypeDto;
import com.woniu.client.param.UpdateVenueStateParam;
import com.woniu.commons.exception.YogaException;
import com.woniu.commons.model.Result;
import com.woniu.model.model.YCoach;
import com.woniu.model.model.YVenue;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "account-server",path = "/account")
public interface AccountClient {

    @GetMapping("/yCoach/updateCoachState")
    @ApiOperation("根据id更新教练信息")
    public Result<?> updateCoach(@SpringQueryMap YCoach coach);

    @GetMapping("/yCoach/byId/{id}")
    @ApiOperation("根据id查找教练信息")
    public Result<YCoach> byId(@PathVariable("id") Integer id);

    @GetMapping("/yCoachResume/yCoachResumes/{coachId}")
    @ApiOperation("根据id查找教练简历")
    Result<CoachResumeDto> loadCoachResumeByCoachId(@PathVariable("coachId") Integer coachId);



    /**
     *form 修改场馆状态 参数场馆ID 以及要修改的状态值
     * @param
     * @return
     */
    @GetMapping("/yVenue/updateVenueState")
    @ApiOperation("修改场馆状态0 已注销 1未认证 2认证成功 3认证失败'")
    public Result updateVenueState(@SpringQueryMap UpdateVenueStateParam param);


    /**
     * 根据id查找场馆信息
     * @param id
     * @return
     */
    @GetMapping("/yVenue/byId/{id}")
    @ApiOperation("根据id查找场馆信息")
    public Result<YVenue> venueById(@PathVariable("id") Integer id)throws YogaException;




    /**
     * 根据id查找教练类别信息
     * @param id
     * @return
     */
    @GetMapping("/yCoachType/byId/{id}")
    @ApiOperation("根据id查找教练类别信息")
    public Result<CoachTypeDto> CoachTypeById(@PathVariable("id") Integer id);
}
